namespace KYO.DAL {
    using System;
    using System.Text;
    using System.Collections;
    using System.Collections.Generic;
    
    public partial class Category : ObjectPersistence.ORNetBaseType {
        public Category() {
        }
        public Category(int Odering, bool Published, string Title) {
            this.Odering = Odering;
            this.Published = Published;
            this.Title = Title;
        }
        public Category(int CategoryID, int Odering, bool Published, string Title) {
            this.CategoryID = CategoryID;
            this.Odering = Odering;
            this.Published = Published;
            this.Title = Title;
        }

        public int CategoryID {
            get {
                return _CategoryID;
            }
            set {
                this._CategoryID = value;
                this.ChangesMade = true;
            }
        }
        public int Odering {
            get {
                return _Odering;
            }
            set {
                this._Odering = value;
                this.ChangesMade = true;
            }
        }
        public bool Published {
            get {
                return _Published;
            }
            set {
                this._Published = value;
                this.ChangesMade = true;
            }
        }
        public string Title {
            get {
                return _Title;
            }
            set {
                this._Title = value;
                this.ChangesMade = true;
            }
        }


        public BusinessLayerHelper.PersistentList<KYO.DAL.Information> InformationColl {
            get {
                if ((_InformationColl == null)) {
                    if (IsNew) {
                        _InformationColl = new BusinessLayerHelper.PersistentList<KYO.DAL.Information>();
                    }
                    else {
                        ObjectPersistence.CategoryAssembler _tempAssem = new ObjectPersistence.CategoryAssembler();
                        _InformationColl = _tempAssem.GetInformationColl(CategoryID);
                    }
                }
                return _InformationColl;
            }
            set {
                this._InformationColl = value;
            }
        }


        private int _CategoryID;
        private int _Odering;
        private bool _Published;
        private string _Title;
        private BusinessLayerHelper.PersistentList<KYO.DAL.Information> _InformationColl;


        public bool IsInformationCollNull() {
            return (this._InformationColl == null);
        }
        public string ROKeyString {
            get {
                return ("KYO.DAL.Category" + CategoryID.ToString());
            }
        }

    }
}
